<?php

class Tools {

  static public function generateGettersAndSetters($class) {
 	$reflection = new ReflectionClass($class);
	$properties = $reflection->getdefaultProperties();
	
	print("<textarea style=\"width: 680px; height: 480px;\">");
	print("//Getters and Setters");
	
	foreach ($properties as $key => $value) {
	
		//generate the Getter
		print("\npublic function get".ucfirst($key)."() {");
		print("\n\treturn \$this->$key;");
		print("\n}\n");
		
		//generate the Setter
		print("\npublic function set".ucfirst($key)."($$key) {");
		print("\n\t\$this->$key = $$key;");
		print("\n}\n");
	}
	
	print("</textarea>");

  }

}
?>
